home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / netz / multilink / mlink_install < prev    next >
Text File  |  1995-03-30  |  20KB  |  443 lines

  1. ;********************************************************************
  2. ; Multilink Installer by Robert Reiswig (rcr@netcom.com) ©1995
  3. ; If you wish to use parts of this installer you must ask!
  4. ; For Mr. Ezra Story for one very cool Program!
  5. ;
  6. ; Installer Version 2.0c
  7. ;********************************************************************
  8.  
  9. (set PAYOLA 0) ;**  0=No Pay   1=Pay
  10.  
  11. ;********************************************************************
  12. ; Current Version of Mlink
  13. ;********************************************************************
  14. (set MlinkVer "1.7")
  15.  
  16.  
  17. ;********************************************************************
  18. ; Info on Ezra and Mlink and a shameless plug for me :)
  19. ;********************************************************************
  20. (message "\nMultilink V" MlinkVer "\n\nCopyright (c) 1994, 1995\n\nby:\n\nEzra Story\n\nezy@panix.com\n\n\n"
  21.          "Installer By:\nRobert Reiswig (rcr@netcom.com)")
  22.  
  23. ;********************************************************************
  24. ; If payed the say thanks!
  25. ;********************************************************************
  26. (if (= PAYOLA 1)
  27.    (message "\n\n\n\n\nThank You\n\n\nfor registering Multilink!")
  28. )
  29.  
  30. ;********************************************************************
  31. ; Ask what to copy and then do it
  32. ;********************************************************************
  33. (set mcopy      (askoptions (choices " MLink (Amiga Executable)" " MLink.guide (Documentation)"
  34.                                      " Napsaterm (Telnet Tool)" " Dock Icon (For ToolManger)"
  35.                                      " MLink ARexx Scripts")
  36.                             (prompt "Please Select the Multilink files wish to Install.")
  37.                             (help "Please Select the Multilink files wish to Install.")
  38.                             (default 63)
  39.                 )
  40. )
  41. ;********************************************************************
  42. ; Ask if upgrading
  43. ;********************************************************************
  44. (set before (askchoice (choices "Upgrading - Keep Current Settings" "First Time Install - Enter Settings")
  45.                      (prompt "Have you installed Multilink before and would you like to keep your current settings?".)
  46.                      (help   "The name of the serial device you use.")
  47.                      (default 0)
  48.             )
  49. )
  50.  
  51. ;*************************************************************************
  52. ; Ask where old file is and back it up  (to get correct Filename and Dir!)
  53. ;*************************************************************************
  54.  
  55. (if (= before 0)
  56.    (
  57.       (set whereold (askdir (prompt "Please select the *directory* where Multilink is stored.")
  58.                             (help   "Please select the directory where Multilink is stored.")
  59.                             (default "Work:")
  60.                     )
  61.       )
  62.  
  63.       (set oldname (askfile (prompt "Please select the current *Mlink* file.\n(This will be renamed with '_old')")
  64.                             (help   "Please select the current *Mlink* file.\n(This will be renamed with '_old')")
  65.                             (default (tackon whereold "mlink"))
  66.                    )
  67.       )
  68.  
  69.    (rename oldname (cat oldname "_old"))
  70.    (rename (cat oldname ".info") (cat oldname "_old.info"))
  71.  
  72.    (set where whereold)
  73.  
  74.    )
  75. )
  76.  
  77. ;********************************************************************
  78. ; Check to see what user wan't copied and do it!
  79. ;********************************************************************
  80. (if (<> mcopy 0)
  81.  (
  82.  
  83.   (if (= before 1)
  84.      (
  85.  
  86.      (set mlinkDir  (askdir (prompt "Please select where you wish to put the selected programs. (A directory called 'MLink' will be created there!)")
  87.                             (help   "Select where you wish to put the selected programs. (A directory called 'MLink' will be created there!)")
  88.                             (default "ram:")
  89.                     )
  90.      )
  91.  
  92.    ;********************************************************************
  93.    ; Make Mlnik dir, if it is not there
  94.    ;********************************************************************
  95.      (if (< (exists (tackon mlinkDir "MLink")) 2)
  96.          (makedir (tackon mlinkDir "MLink") (infos))
  97.      )
  98.  
  99.      (set where (tackon mlinkDir "MLink"))
  100.  
  101.      )
  102.   )
  103.  
  104.  ;********************************************************************
  105.  ; Copy Mlink and Ask if user wants to set ToolTypes
  106.  ;********************************************************************
  107.   (if (IN mcopy 0)
  108.      (
  109.        (copyfiles (source "MLink")  (dest where) )
  110.  
  111.        (if (= before 1) (copyfiles (source "MLink.info")  (dest where) ) )
  112.  
  113.        (if (= before 0) (copyfiles (source (cat oldname "_old.info")) (dest where) (newname (cat oldname ".info")) ))
  114.  
  115.  
  116.      ;********************************************************************
  117.      ; See what type of settings user wants to set now
  118.      ;********************************************************************
  119.       (if (= before 1)
  120.          (
  121.            (set sett (askoptions (choices " Basic Settings" " Interface Settings" " Advance Settings")
  122.                                  (prompt "Which of the following settings would you like to set now? (These are "
  123.                                         "the ToolTypes for Mlink, you can always change these later. Basic Settings is all you should need for now.)")
  124.                                  (help "Which of the following settings would you like to set now?")
  125.                                  (default 1)
  126.                      )
  127.            )
  128.          )
  129.       )
  130.      ;********************************************************************
  131.      ; Ask about the Basic stuff, if user has selected it
  132.      ;********************************************************************
  133.       (if (IN sett 0)
  134.          (
  135.            (set device (askchoice (choices "serial.device" "gvpser.device" "baudbandit.device" "artser.device" "usr.device" "duart.device" "Other")
  136.                      (prompt "The name of the serial device you use.  Multilink defaults to "
  137.                              "using 'serial.device'".)
  138.                      (help   "The name of the serial device you use.")
  139.                      (default 0)
  140.                      )
  141.            )
  142.  
  143.            (if (= device 6)
  144.               (
  145.                 (set device  (askstring
  146.                              (prompt "Enter the Serial Device you use.")
  147.                              (help   "Enter the Serial Device you use.")
  148.                              (default ".device")
  149.                              )
  150.                 )
  151.               )
  152.            )
  153.  
  154.  
  155.            (set unit (askchoice (choices "0" "1" "2" "3" "4" "5" "6" "7")
  156.                      (prompt "The unit of the serial device to use.  Multilink defaults to 0.")
  157.                      (help   "The unit of the serial device yo use.")
  158.                      (default 0)
  159.                      )
  160.            )
  161.  
  162.  
  163.  
  164.            (set baud (askchoice (choices "300" "1200" "2400" "9600" "19200" "31250" "38400" "57600" "64000" "76800" "115200" "230400")
  165.                      (prompt "The bps rate to use on the serial port. Multilink defaults to "
  166.                              "using the rate you set in sys:prefs/serial. (This will be the baud"
  167.                              " rate that you have set in your Term program.)")
  168.                      (help   "Enter the Baud rate that you have set in your Terminal Program.")
  169.                      (default 7)
  170.                      )
  171.            )
  172.  
  173.            (set hispeed (askchoice (choices "YES" "NO")
  174.                         (prompt "If you're using 8bit no parity, you should probably turn this on."
  175.                                 " It activates a lower-overhead mode in the C= serial.device for 8n1 ports."
  176.                                 "\n(Default is YES)")
  177.                         (help   "If you're using 8bit no parity, you should probably turn this on.")
  178.                         (default 0)
  179.                         )
  180.            )
  181.  
  182.            (set ctsrts  (askchoice (choices "YES" "NO")
  183.                         (prompt "If this specified, Multilink will use CTS/RTS handshaking.  Again, "
  184.                                 "by default, Multilink will use it if you have set it in "
  185.                                 "sys:prefs/serial as well.\n(Default is YES)")
  186.                         (help   "If this specified, Multilink will use CTS/RTS handshaking, you should probably turn this on.")
  187.                         (default 0)
  188.                         )
  189.            )
  190.  
  191.            (set forcecd (askchoice (choices "YES" "NO")
  192.                         (prompt "If you have a wierd wiring on your serial port (ie.  direct "
  193.                                 "connect) you may need to set this option to make Multilink ignore "
  194.                                 "the state of the carrier line on the port.\n(Default is NO)")
  195.                         (help   "If you have a wierd wiring on your serial port, you may need to set this option ON")
  196.                         (default 1)
  197.                         )
  198.            )
  199.  
  200.  
  201.            (set cps     (askstring
  202.                         (prompt "Set this to the average characters per second you typically get "
  203.                                 "over your connection to the UNIX host on a Zmodem download or "
  204.                                 "upload.  This is an important option!  Set it too low, and your "
  205.                                 "speed will suffer.  Set it too high, and interactive response will "
  206.                                 "suffer.  As an example, the typical setting for a 14.4kbps v42bis "
  207.                                 "link is about 1500 or 1600.  If you leave this unspecified, "
  208.                                 "Multilink will default to 3840 (which is probably wrong for you). "
  209.                                 )
  210.                         (help   "Set Avg. CPS")
  211.                         (default "1500")
  212.                         )
  213.            )
  214.  
  215.  
  216.  
  217.            (set USU     (askstring
  218.                         (prompt "This should be set to the command line you would use to start mlink "
  219.                                 "on the UNIX host.  ie.  If you keep mlink in your home directory, "
  220.                                 "it should be \"~/mlink\", or if you keep it in a bin directory in "
  221.                                 "your account it might be \"~/bin/mlink\".  Multilink defaults to "
  222.                                 "using just \"mlink\" , which will usually work if the mlink "
  223.                                 "executable is in your search path on the UNIX host. (You must include the \" \" around the command!)"
  224.                         )
  225.                         (help   "Command line to start Mlink")
  226.                         (default "\"mlink\"")
  227.                         )
  228.            )
  229.  
  230.            ;********************************************************************
  231.            ; Based on the answers gave, set data up for the TooType
  232.            ;********************************************************************
  233.            (if (= baud 0) (set baud "300"))     (if (= baud 1) (set baud "1200"))
  234.            (if (= baud 2) (set baud "2400"))    (if (= baud 3) (set baud "9600"))
  235.            (if (= baud 4) (set baud "19200"))   (if (= baud 5) (set baud "31250"))
  236.            (if (= baud 6) (set baud "38400"))   (if (= baud 7) (set baud "57600"))
  237.            (if (= baud 8) (set baud "64000"))   (if (= baud 9) (set baud "76800"))
  238.            (if (= baud 10) (set baud "115200")) (if (= baud 11) (set baud "230400"))
  239.  
  240.            (if (= device 0) (set device "serial.device"))
  241.            (if (= device 1) (set device "gvpser.device"))
  242.            (if (= device 2) (set device "baudbandit.device"))
  243.            (if (= device 3) (set device "artser.device"))
  244.            (if (= device 4) (set device "usr.device"))
  245.            (if (= device 5) (set device "duart.device"))
  246.  
  247.            (if (= unit 0) (set unit "0")) (if (= unit 1) (set unit "1"))
  248.            (if (= unit 2) (set unit "2")) (if (= unit 3) (set unit "3"))
  249.            (if (= unit 4) (set unit "4")) (if (= unit 5) (set unit "5"))
  250.            (if (= unit 6) (set unit "6")) (if (= unit 7) (set unit "7"))
  251.  
  252.            ;********************************************************************
  253.            ; Set the ToolType with the basic answers.....
  254.            ;********************************************************************
  255.            (tooltype    (dest (tackon where "Mlink"))
  256.                         (settooltype "BAUD" baud)
  257.                         (if (= hispeed 0) (settooltype "HISPEED" "") )
  258.                         (if (= ctsrts 0) (settooltype "CTSRTS" "") )
  259.                         (if (= forcecd 0) (settooltype "FORCECD" "") )
  260.                         (settooltype "CPS" cps)
  261.                         (settooltype "DEVICE" device)
  262.                         (settooltype "UNIT" unit)
  263.                         (settooltype "UNIXSTARTUP" USU)
  264.  
  265.            )
  266.  
  267.            ;********************************************************************
  268.            ; Note to change......
  269.            ;********************************************************************
  270.            (message "\n\nRembember that you can change these settings by editing the ToolTypes.")
  271.  
  272.  
  273.          )
  274.       )
  275.  
  276.      ;********************************************************************
  277.      ; Asking about the Interface stuff, if the user selected it
  278.      ;********************************************************************
  279.       (if (IN sett 1)
  280.          (
  281.           (message "\n\n\nThe following have to do with the\n\nInterface ToolTypes.")
  282.  
  283.           (set wintop  (askstring (prompt "Use this to specify the starting position of the Multilink status "
  284.                                           "window. (Pixels down from the top.)")
  285.                            (help   "Pixles down from the top.")
  286.                            (default "10")
  287.                 )
  288.           )
  289.  
  290.           (set winleft     (askstring (prompt "Use this to specify the starting position of the Multilink status "
  291.                                               "window. (Pixels from the left edge of the screen.)")
  292.                            (help   "Pixles from the left edge of the screen.")
  293.                            (default "10")
  294.                 )
  295.           )
  296.  
  297.           (set pubscreen    (askstring (prompt "Set this to the name of the public screen you want Multilink's "
  298.                                                "window to open on.  Multilink defaults to opening on the default "
  299.                                                "public screen.\n(Press <RETURN> if you wish for Multilink to open on the default public screen!)")
  300.                            (help   "Set this to the name of the public screen you want Multilink's window to open on.")
  301.                            (default "")
  302.                 )
  303.           )
  304.  
  305.  
  306.           (set iconify  (askchoice (choices "YES" "NO")
  307.                         (prompt "Specify this if you want Multilink to start up iconified. "
  308.                                 "\n(Default is NO)")
  309.                         (help   "Specify this if you want Multilink to start up iconified. ")
  310.                         (default 1)
  311.                         )
  312.           )
  313.  
  314.            ;********************************************************************
  315.            ; Set the ToolType with the interface answers.....
  316.            ;********************************************************************
  317.            (tooltype    (dest (tackon where "Mlink"))
  318.                         (settooltype "WINTOP" wintop)
  319.                         (settooltype "WINLEFT" winleft)
  320.                         (if (> pubscreen "") (settooltype "PUBSCREEN" pubscreen) )
  321.                         (if (= iconify 0) (settooltype "ICONIFY" "") )
  322.            )
  323.  
  324.  
  325.  
  326.  
  327.          )
  328.       )
  329.  
  330.  
  331.      ;********************************************************************
  332.      ; Asking about the Interface stuff, if the user selected it
  333.      ;********************************************************************
  334.       (if (IN sett 2)
  335.          (
  336.  
  337.           (message "\n\n\nThe following have to do with the\n\nAdvanced ToolTypes.")
  338.  
  339.           (set unixcps (askstring
  340.                        (prompt "This is exactly the same as the CPS option except it refers only to "
  341.                                "the speed of data from the UNIX host to your Amiga.  Multilink "
  342.                                "defaults to using the same pacing speed in both directions.  If you "
  343.                                "need to have a differing speed in each direction, then use CPS for "
  344.                                "Amiga->UNIX and UNIXCPS for UNIX->Amiga.")
  345.                         (help  "Set UNIXCPS")
  346.                         (default "1500")
  347.                         )
  348.           )
  349.  
  350.          ;(2048/serialcps)+6 (on hold)
  351.  
  352.           (set packetsize (askstring
  353.                        (prompt "Sets the maximum packet size.  The default and true maximum is "
  354.                                "2047.  You may set the packetsize anywhere from 1 to 2047.")
  355.                         (help  "Sets the maximum packet size.")
  356.                         (default "2047")
  357.                         )
  358.           )
  359.  
  360.           (set servfile (askstring
  361.                        (prompt "Specifies a file from which to look up inet service names before "
  362.                                "asking the UNIX host.  Multilink defaults to just asking the remote "
  363.                                "UNIX host for the names and ports.  This option is used to allow "
  364.                                "custom service names, so that one can run daemons launched by inetd "
  365.                                "with Mlink.\n(You must include the \" \" around the file!)")
  366.                         (help  "Specifies a file from which to look up inet service names.")
  367.                         (default "\" \"")
  368.                         )
  369.           )
  370.  
  371.           ;********************************************************************
  372.           ; Set the ToolType with the Advance answers.....
  373.           ;********************************************************************
  374.            (tooltype    (dest (tackon where "Mlink"))
  375.                         (settooltype "UNIXCPS" unixcps)
  376.                         (settooltype "PACKETSIZE" packetsize)
  377.                         (settooltype "SERVFILE" servfile)
  378.            )
  379.  
  380.          )
  381.       )
  382.  
  383.  
  384.  
  385.  
  386.      )
  387.  
  388.   )
  389.  
  390.  ;********************************************************************
  391.  ; Copy Guide File
  392.  ;********************************************************************
  393.   (if (IN mcopy 1) (copyfiles (source "Docs/MLink.guide")  (dest where) (infos) ) )
  394.  
  395.  ;********************************************************************
  396.  ; Copy Napsa#?Guide File
  397.  ;********************************************************************
  398.   (if (IN mcopy 2)
  399.      (
  400.       (copyfiles (source "Clients/napsaprefs")  (dest where) (infos) )
  401.       (copyfiles (source "Clients/napsaterm")  (dest where) (infos) )
  402.      )
  403.  
  404.   )
  405.  
  406.  ;********************************************************************
  407.  ; Copy Dock Icon
  408.  ;********************************************************************
  409.  (if (IN mcopy 3) (copyfiles (source "Icons/tools_mlink.info")  (dest where)) )
  410.  
  411.  ;********************************************************************
  412.  ; Copy ARexx scripts
  413.  ;********************************************************************
  414.  (if (IN mcopy 4) (copyfiles (source "Rexx/MLStat") (dest where)) )
  415.  
  416.  ;********************************************************************
  417.  ; Set the @default to where Mlink was copied
  418.  ;********************************************************************
  419.   (set @default-dest where)
  420.  
  421.  
  422.  )
  423. )
  424.  
  425.  
  426. ;********************************************************************
  427. ; Let them know that his is Shareware
  428. ;********************************************************************
  429. (message "\n\n\n\n\nDon't forget to upload \"mlink.tar.gz\" to your\n\nUNIX Host.")
  430.  
  431.  
  432. (if (= PAYOLA 0)
  433.    (
  434.      (message "Shareware Information\n"
  435.               "=====================\n\n"
  436.               "Multilink is uncrippled shareware.  That means if you like the package, "
  437.               "and use it, you have to send me $25.  If you hate the thing, and hardly "
  438.               "ever touch it, you don't.\n\n"
  439.               "For more information please read the mlink.guide file!"
  440.      )
  441.    )
  442. )
  443.